<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="model.User;" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="PagesUI/scripts/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
	$(function() {
		//<c:set var="message" value="Hello"/>
		var role = '<c:out value="${userInfo.type}"/>';
		if(role == "1"){
			$("#role").val(role);
			$("#role option:selected").attr('disabled','disabled').siblings().removeAttr('disabled');
			$("#role option[value='0']").remove();
			$("#role option[value='-1']").remove();
			$("#menu4").empty();
		}
		if(role == "0"){
			$("#role").val(role);
			$("#role option:selected").attr('disabled','disabled').siblings().removeAttr('disabled');
			$("#role option[value='1']").remove();
			$("#role option[value='-1']").remove();
		}
		if(role == "-1"){
			$("#role").val(role);
			$("#role option:selected").attr('disabled','disabled').siblings().removeAttr('disabled');
			$("#role option[value='1']").remove();
			$("#role option[value='0']").remove();
			//$("#menu5").before('<li id="menu7"><a href="waitting">Lobby</a></li>')
			$("#menu1").empty();
			$("#menu2").empty();
			$("#menu3").empty();
			$("#menu4").empty();	
		}
	});
	
	
</script>
</head>
<body>
	<a id="logo" href="http://www.csc.com/vn_vn"> <img alt="CSC"
		src="PagesUI/images/csc-logo.PNG" style="border: none;" />
	</a>
	<div id="title">
		<p class="middle">
			<span style="font-size: 20pt;">PRODUCT <span
				style="color: #1A9F68">MANAGEMENT</span>
			</span>
		</p>
	</div>
	<div style="display: table; height: 88px; float: right;">
		<div id="personalInfo" class="middle"><label>Welcome: </label><label style="color: red;"><c:out value="${userInfo.username}" /></label></div>
		<div id="rolePane" class="middle">
				<label>Role:</label>
				<select id="role">
					<option value="-1">Guest</option>
					<option value="1">Manager Manufacture</option>
					<option value="0">Administrator</option>
				</select>
		</div>
		<div id="logoutPane" class="middle" style="cursor: pointer;"
			onclick="logOut();">
			<img style="vertical-align: middle;" src="PagesUI/images/logout.png">
			<a href="logout">Log Out</a>
		</div>
	</div>
	<jsp:include page="/PagesUI/tabmenu.jsp"></jsp:include>
</body>
</html>